<?php
//DATABASE CONNECTION CONFIG FOR LOH VERSION 4.0

$dbconnect  = NULL;
define("DB_HOST", "mysql.server.com");  //mysql server DNS or localhost
define("DB_USERNAME", "loh_chaos"); //database name
define("DB_USERPASS", "password"); //password

$query      = NULL;

function db_connect($dbname)
{
   global $dbconnect, $dbhost, $dbusername, $dbuserpass;
   
   if (!$dbconnect) $dbconnect = mysql_connect(DB_HOST, DB_USERNAME, DB_USERPASS);
   if (!$dbconnect) {
      return 0;
   } elseif (!mysql_select_db($dbname)) {
      return 0;
   } else {
      return $dbconnect;
   } // if
   
} // db_connect

?>